<#include "/common/layout.html"> 
<@layout title="123">
<script type="text/javascript" src="/js/easyui/easyui_grid.js"></script>
<script type="text/javascript">
var datagrid;
	var model_name = "/market";
	var model_title="市场列表";
	$(function() {
		datagrid=$('#form_datagrid').datagrid({
		 	url:model_name+'/grid',
		 	columns:[[    
		        {field:'id',title:'编号',width:100,checkbox:true},
		        {field:'name',title:'市场名称',width:120},
		        {field:'address',title:'所属城市',width:100},
		        {field:'summary',title:'市场简介',width:200},
		        {field:'phone',title:'联系电话',width:120},
		        {field:'logo',title:'图片',width:310,
			        formatter:function(value,row,index){
			        	if(value)
			        	return "<span url='"+value+"' style='cursor:pointer;color:blue;'  onmouseover='hoverShow(this);'onmouseout='$(\"#imgShow\").hide();'>"+value+"</span>";
			        }
		        },
		        {field:'cz',title:'视频',
			        formatter:function(value,row,index){
			        	return "<a href='#' onclick='cameraView("+row.id+")' class='linkbutton' icon='icon-print'>视频管理</a>";
			        }
		        }
		    ]],
		    onLoadSuccess:function(data){
				$(".linkbutton").linkbutton();
			}
		})
	})
</script>

<div id="DialogCamera_"></div>
<script type="text/javascript">
//查看
function cameraView(id_,title){
	cameraOoip(model_name+"/camera/"+id_,title);
}
function cameraOoip(url,title){
	$('#DialogCamera_').dialog({
	    title: '对应视频-'+model_title,   
	    width: 840,   
	    height: 450,
	    top:0, 
	    cache: false,
	    maximizable:true,
	    href: url,   
	    modal: true,
	    onLoad:function(){
	    	$.messager.progress('close');
	    },
	    onLoadError:function(){
	    	$.messager.progress('close');
	    },
		buttons:[{
			text:"关闭",
			handler:function() {
				$('#DialogCamera_').dialog('close');
			}
		}]
	});
}
</script>

<script type="text/javascript" src="/js/easyui/easyui_grid_common.js"></script>
</head>
	<#include "/common/seach.html" />
	<@seach>
	<td>市场名称</td>
	<td><input type="text" name="LIKE_name"></li></td>
	<td>市场所属城市</td>
	<td><input type="text" name="LIKE_address"></li></td>
	</@seach>
</@layout>